Merged
Conversation
shahronak47
commented
Jan 13, 2025
randrescastaneda
requested changes
Feb 4, 2025
Member
randrescastaneda
left a comment
There was a problem hiding this comment.
Hi @shahronak47,
Thank you for your PR. This is looking great. I reviewed the code and have a few points to discuss:
- The lines
DBI::dbGetQuery(con, "select * ")cannot be executed because theconobject is not available in the global environment. However, this should not be an issue if subsequent calls topip()use theconobject created in the previous call. - Running
pip(country = "AGO", year = "all", lkup = lkup, fill_gaps = TRUE)produces the following warning:Warning message: Connection is garbage-collected, use dbDisconnect() to avoid this. - The idea of displaying whether the data is loaded from cache is great. However, this message should only appear in interactive mode, right?
- We need a separate DuckDB file for each release, and it should not be placed at the root of the folder. The cache must be release-dependent.
- The
conobject should be created in the.Rprofilewhen the lookups are created.
Let's discuss this further in a phone call.
Thank you.
…eam/pipapi into implement-duckdb
Contributor
Author
|
Hi Andres, Based on our discussions here are the changes implemented -
|
…eam/pipapi into implement-duckdb
…eam/pipapi into implement-duckdb
Contributor
Author
|
Hi @randrescastaneda , one thing to note here is the latest |
Member
OOHHH. Ok. Let's do it. It is not ideal, but it is what it is. Thanks for letting me Know. Best, |
randrescastaneda
approved these changes
Mar 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Andres, I have added the code in
implement-duckdbbranch. First you need to set the path of duckdb file that I have in E drive.There is a vignette called duckdb-caching.Rmd which explains the process. There are two master files
rg_master_fileandfg_master_filein duckdb. They are selected based on thefill_gapsargument. I have kept both of them as empty for you to test and verify the examples.Here are examples for you to try out. Please create the
lkupobject to try the following code.After you have got hang of it, you can try out different
pipcalls and verify the caching algorithm and the result.